# 字符串拼接
s1 = "hello"
s2 = "world"
print(s1 + s2)

print(''.join([s1, s2]))
print('*'.join(['java', 'php']))

print('hello''world')

print('%s%s' % (s1, s2))
print(f'{s1}-{s2}')
print('{0}{1}'.format(s1, s2))

# 字符串去重
s3="helloworldhellohellohello"
new_s=''
for item in s3:
    if item not in new_s:
        new_s+=item
print(new_s)

new_s3=set(s3)
lst=list(new_s3)
lst.sort(key=s3.index)
print(''.join(lst))
